<?php
//filename : module/SanAuthWithDbSaveHandler/view/san-auth-with-db-save-handler/auth/index.phtml
$title = 'Đăng kí';
$this->headTitle($title);
?>
<script type="text/javascript">
$(document).ready(function(){
	
			// Validate form
			$("#register").validate({
				errorElement: "span", // Định dạng cho thẻ HTML hiện thông báo lỗi
				rules: {
					username: { rangelength: [2,10] }, //Chiều dài chuỗi trong khoảng từ 4 - 10 ký tự
					password: { rangelength: [4,16] },
					
				}
					 
				 
			});
	
});
</script>
<div class="login_form">
        
        <div class="login_body">
          <h1>Đăng ký thành viên</h1>
              <?php 
				$form = $this->form;
				$form->setAttribute('action', $this->url(
					'auth', array('action' => 'register')
				));
				$form->prepare();
 				echo $this->form()->openTag($form); echo $this->formHidden($form->get('id')) . PHP_EOL;?>
                  <table style="margin-top:20px;">
                    <tr>
                        <td>Tên đăng nhập </td>
                        <td><?php echo $this->formRow($form->get('username')) . PHP_EOL; ?></td>
                        <td rowspan="4"><div class="if"><a style="color:#FFF" href="<?php echo $this->url('home') ?>">Trở về trang chủ</a></div></td>
                    </tr>
                    <tr>
                        <td>Mật khẩu </td>
                        <td><?php echo $this->formRow($form->get('password')) . PHP_EOL; ?></td>
                    </tr>
                    <tr>
                        <td>Nhập số CMT </td>
                        <td><?php echo $this->formRow($form->get('cmt')) . PHP_EOL; ?></td>
                    </tr>
                    <tr>
                        <td>Email </td>
                        <td><?php echo $this->formRow($form->get('email')) . PHP_EOL; ?></td>
                    </tr>
                    <tr>
                        <td>Họ tên </td>
                        <td><?php echo $this->formRow($form->get('hoten')) . PHP_EOL; ?></td>
                    </tr>
                    
                     <tr colspan="2">
                         <td></td>
                         <td ><?php echo "<br>".$this->formRow($form->get('submit')) . PHP_EOL; ?></td>
                    </tr>
                </table> 
            <?php echo $this->form()->closeTag(); ?>
        </div>
        <div id="error" class="error"><?php echo $this->error; ?></div>
        </div>

